package exp03;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 * Created by Administrator on 2022/10/31.
 */
public class C {
    public static void main(String[] args) {
        int n = cin.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = cin.nextInt();

        }
        Queue<Integer> q = new LinkedList<>();
        for (int i : arr) {
            q.offer(i);
        }
        while (!q.isEmpty()) {
            int head = q.peek();
            System.out.print(head + " ");
            q.poll();
            if (q.size() > 0) {
                head = q.peek();
                q.poll();
                q.offer(head);
            }
        }
    }

    static QuickInput cin = new QuickInput();


    static class QuickInput {
        BufferedReader buf;
        StringTokenizer tok;

        QuickInput() {
            buf = new BufferedReader(new InputStreamReader(System.in));
        }

        boolean hasNext() {
            while (tok == null || !tok.hasMoreElements()) {
                try {
                    tok = new StringTokenizer(buf.readLine());
                } catch (Exception e) {
                    return false;
                }
            }
            return true;
        }

        String next() {
            if (hasNext()) return tok.nextToken();
            return null;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }


    }
}
